cd ".."
use "....dta", clear

rename fe_fathering e_fathering
rename fb_fathering b_fathering

*---------------------------------------------------------------------------------*
*GETTING THE MEAN SCORES FOR ENGAGEMENT FACTORS
*---------------------------------------------------------------------------------*

**    fathers

*
**needs
*
*alpha fb_q2_perception  fb_q4_perception  ///
*fb_q22_perception fb_q8_perception  ///
*fb_q10_perception fb_q11_perception fb_q13_perception ///
*, item gen (b_en_n_f_sum)
*
*
*alpha fe_q2_perception  fe_q4_perception  ///
*fe_q22_perception fe_q8_perception  ///
*fe_q10_perception fe_q11_perception fe_q13_perception ///
*, item gen (e_en_n_f_sum)
*
*
**collaboration
*alpha fb_q29_perception fb_q30_perception  ///
*fb_q32_perception fb_q33_perception fb_q34_perception ///
*fb_q1_engage fb_q2_engage fb_q3_engage, item gen(b_en_cb_f_sum)
*
*alpha fe_q29_perception fe_q30_perception  ///
*fe_q32_perception fe_q33_perception fe_q34_perception ///
*fe_q1_engage fe_q2_engage fe_q3_engage, item gen(e_en_cb_f_sum)
*
**physical needs
*alpha fb_q5_perception fb_q9_perception fb_q4_engage fb_q5_engage, item gen(b_en_p_f_sum)
*alpha fe_q5_perception fe_q9_perception fe_q4_engage fe_q5_engage, item gen(e_en_p_f_sum)
*
**communication
*alpha rfb_q26_perception fb_q27_perception fb_q28_perception rfb_q7_engage, item gen(b_en_cm_f_sum)
*alpha rfe_q26_perception fe_q27_perception fe_q28_perception rfe_q7_engage, item gen(e_en_cm_f_sum)
*
**harsh discipline
*alpha fb_q14_perception fb_q24_perception fb_q25_perception, item gen(b_en_d_f_sum)
*alpha fe_q14_perception fe_q24_perception fe_q25_perception, item gen(e_en_d_f_sum)
*
**warm engagement
*alpha fb_q6_perception fb_q7_perception fb_q21_perception, item gen(b_en_w_f_sum)
*alpha fe_q6_perception fe_q7_perception fe_q21_perception, item gen(e_en_w_f_sum)
*
**stimulating environment
*alpha fb_q1_sti fb_q2_sti fb_q3_sti fb_q4_sti fb_q5_sti fb_q6_sti fb_q7_sti fb_q8_sti ///
*fb_q9_sti fb_q10_sti fb_q11_sti, item gen(b_sti_f_sum)
*alpha fe_q1_sti fe_q2_sti fe_q3_sti fe_q4_sti fe_q5_sti fe_q6_sti fe_q7_sti fe_q8_sti ///
*fe_q9_sti fe_q10_sti fe_q11_sti, item gen(e_sti_f_sum)
*
***Endline
**-> drop 5 (Describe an emotion or feeling to): alpha 0.7566
*alpha fe_q1_sti fe_q2_sti fe_q3_sti fe_q4_sti fb_q7_sti fe_q6_sti fe_q8_sti ///
*fe_q9_sti fe_q10_sti fe_q11_sti, item 
**-> drop 5 and 7 ( Name colors to): alpha 0.7789
*alpha fe_q1_sti fe_q2_sti fe_q3_sti fe_q4_sti fe_q6_sti fe_q8_sti ///
*fe_q9_sti fe_q10_sti fe_q11_sti, item 
**-> drop 5, 7, and 10 (Recite kabbiya to): alpha 0.8153
*alpha fe_q1_sti fe_q2_sti fe_q3_sti fe_q4_sti fe_q6_sti fe_q8_sti ///
*fe_q9_sti fe_q11_sti, item 
***Baseline
**-> drop 5: alpha 0.8394
*alpha fb_q1_sti fb_q2_sti fb_q3_sti fb_q4_sti fb_q7_sti fb_q6_sti fb_q8_sti ///
*fb_q9_sti fb_q10_sti fb_q11_sti, item 
**-> drop 5 and 7 ( Name colors to): 0.8234
*alpha fb_q1_sti fb_q2_sti fb_q3_sti fb_q4_sti fb_q6_sti fb_q8_sti ///
*fb_q9_sti fb_q10_sti fb_q11_sti, item
**-> drop 5, 7, and 10 (Recite kabbiya to): alpha 0.7982
*alpha fb_q1_sti fb_q2_sti fb_q3_sti fb_q4_sti fb_q6_sti fb_q8_sti ///
*fb_q9_sti fb_q11_sti, item
*
*
**    mothers
*
**GETTING THE MEAN SCORES
*
**needs
*
*alpha mb_q2_perception  mb_q4_perception  ///
*mb_q22_perception mb_q8_perception  ///
*mb_q10_perception mb_q11_perception mb_q13_perception ///
*, item gen (b_en_n_m_sum)
*
*alpha me_q2_perception  me_q4_perception  ///
*me_q22_perception me_q8_perception  ///
*me_q10_perception me_q11_perception me_q13_perception ///
*, item gen (e_en_n_m_sum)
*
*
**collaboration
*alpha mb_q29_perception mb_q30_perception  ///
*mb_q32_perception mb_q33_perception mb_q34_perception ///
*mb_q1_engage mb_q2_engage mb_q3_engage, item gen(b_en_cb_m_sum)
*
*alpha me_q29_perception me_q30_perception  ///
*me_q32_perception me_q33_perception me_q34_perception ///
*me_q1_engage me_q2_engage me_q3_engage, item gen(e_en_cb_m_sum)
*
**physical needs
*alpha mb_q5_perception mb_q9_perception mb_q4_engage mb_q5_engage, item gen(b_en_p_m_sum)
*alpha me_q5_perception me_q9_perception me_q4_engage me_q5_engage, item gen(e_en_p_m_sum)
*
**communication. Dropping rme_q7_engage seems to be best all across (fathers and mothers, bl and el)
*alpha rmb_q26_perception mb_q27_perception mb_q28_perception rmb_q7_engage, item gen(b_en_cm_m_sum)
*alpha rme_q26_perception me_q27_perception me_q28_perception rme_q7_engage, item gen(e_en_cm_m_sum)
*
**harsh discipline
*alpha mb_q14_perception mb_q24_perception mb_q25_perception, item gen(b_en_d_m_sum)
*alpha me_q14_perception me_q24_perception me_q25_perception, item gen(e_en_d_m_sum)
*
**warm engagement
*alpha mb_q6_perception mb_q7_perception mb_q21_perception, item gen(b_en_w_m_sum)
*alpha me_q6_perception me_q7_perception me_q21_perception, item gen(e_en_w_m_sum)
*
**stimulating environment
*alpha mb_q1_sti mb_q2_sti mb_q3_sti mb_q4_sti mb_q5_sti mb_q6_sti mb_q7_sti mb_q8_sti ///
*mb_q9_sti mb_q10_sti mb_q11_sti, item gen(b_sti_m_sum)
*alpha me_q1_sti me_q2_sti me_q3_sti me_q4_sti me_q5_sti me_q6_sti me_q7_sti me_q8_sti ///
*me_q9_sti me_q10_sti me_q11_sti, item gen(e_sti_m_sum)


*---------------------------------------------------------------------------------*
*					which interacted covariates to keep?
*---------------------------------------------------------------------------------*

** are covariates different across populations (camp/host?)
*
*foreach x of varlist _1_f_age _1_m_age ///
*_1_child_fem child_age ///
*_1_mb_child_count ///
*_1_mb_q4_pregnant _1_hh_res _1_hh_qua ///
*{
*ttest `x', by(camp)
*}
*
*
*foreach x of varlist _1_mb_q1_edu _1_mb_grade _1_mb_q4_edu fb_q1_edu fb_grade fb_q4_edu ///
*_1_mb_q1_hunger _1_mb_q2_hunger  _1_mb_q2_fin ///
*{
*tabulate `x' camp, chi2
*}
*
*
*foreach x of varlist b_en_n_f_sum ///
*b_en_cb_f_sum ///
*b_en_p_f_sum ///
*b_en_d_f_sum ///
*b_en_w_f_sum ///
*b_sti_f_sum ///
*b_en_n_m_sum ///
*b_en_cb_m_sum ///
*b_en_p_m_sum ///
*b_en_d_m_sum ///
*b_en_w_m_sum ///
*{
*ttest `x', by(camp)
*}
*
*ttest fb_PHQ, by(camp)
*ttest _1_mb_PHQ, by(camp)
*
** which interactions should we keep in the models?
*
* foreach x in ///
*"en_n_f_sum" ///
*"en_cb_f_sum" ///
*"en_p_f_sum" ///
*"en_cm_f_sum" ///
*"en_d_f_sum" ///
*"en_w_f_sum" ///
*"sti_f" ///
*"fathering" ///
*{ 
*
*mixed e_`x' b_`x' i.tx##camp ///
*_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
*_1_child_fem child_age ///
*i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
*i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
*camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
*camp#_1_child_fem camp#c.child_age ///
*camp#_1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
*camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
*|| mvid: ||clu2:
*
*testparm camp#c._1_f_age
*testparm camp#i.fb_q1_edu 
*testparm camp#i.fb_grade 
*testparm camp#i.fb_q4_edu
*testparm camp#_1_child_fem 
*testparm camp#c.child_age 
*testparm camp#_1_mb_q1_hunger 
*testparm camp#_1_mb_q2_hunger 
*testparm camp#_1_mb_q4_pregnant 
*testparm camp#c._1_mb_child_count 
*testparm camp#_1_mb_q2_fin 
*testparm camp#c._1_hh_res 
*testparm camp#c._1_hh_qua 
*}
*
*
*mixed fe_PHQ fb_PHQ i.tx##camp ///
*_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
*_1_child_fem child_age ///
*i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
*i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
*camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
*camp#_1_child_fem camp#c.child_age ///
*camp#_1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
*camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
*|| mvid: ||clu2:
*
*testparm camp#c._1_f_age
*testparm camp#i.fb_q1_edu 
*testparm camp#i.fb_grade 
*testparm camp#i.fb_q4_edu
*testparm camp#_1_child_fem 
*testparm camp#c.child_age 
*testparm camp#_1_mb_q1_hunger 
*testparm camp#_1_mb_q2_hunger 
*testparm camp#_1_mb_q4_pregnant 
*testparm camp#c._1_mb_child_count 
*testparm camp#_1_mb_q2_fin 
*testparm camp#c._1_hh_res 
*testparm camp#c._1_hh_qua 
*
*mixed fe_GAD i.tx##camp ///
*_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
*_1_child_fem child_age ///
*i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
*i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
*camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
*camp#_1_child_fem camp#c.child_age ///
*camp#_1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
*camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
*|| mvid: ||clu2:
*
*testparm camp#c._1_f_age
*testparm camp#i.fb_q1_edu 
*testparm camp#i.fb_grade 
*testparm camp#i.fb_q4_edu
*testparm camp#_1_child_fem 
*testparm camp#c.child_age 
*testparm camp#_1_mb_q1_hunger 
*testparm camp#_1_mb_q2_hunger 
*testparm camp#_1_mb_q4_pregnant 
*testparm camp#c._1_mb_child_count 
*testparm camp#_1_mb_q2_fin 
*testparm camp#c._1_hh_res 
*testparm camp#c._1_hh_qua 
*
* mixed fe_ss i.tx##camp ///
*_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
*_1_child_fem child_age ///
*i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
*i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
*camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
*camp#_1_child_fem camp#c.child_age ///
*camp#_1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
*camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
*|| mvid: ||clu2:
*
*testparm camp#c._1_f_age
*testparm camp#i.fb_q1_edu 
*testparm camp#i.fb_grade 
*testparm camp#i.fb_q4_edu
*testparm camp#_1_child_fem 
*testparm camp#c.child_age 
*testparm camp#_1_mb_q1_hunger 
*testparm camp#_1_mb_q2_hunger 
*testparm camp#_1_mb_q4_pregnant 
*testparm camp#c._1_mb_child_count 
*testparm camp#_1_mb_q2_fin 
*testparm camp#c._1_hh_res 
*testparm camp#c._1_hh_qua 
*
*
*
**-----------------------------------------------------------------------------*
**MOTHER
*
*
* foreach x in ///
*"en_n_m_sum" ///
*"en_cb_m_sum" ///
*"en_p_m_sum" ///
*"en_cm_m_sum" ///
*"en_d_m_sum" ///
*"en_w_m_sum" ///
*{ 
*mixed e_`x' b_`x' i.tx##camp ///
*_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
*_1_child_fem child_age ///
*i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
*i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
*camp#c._1_m_age camp#i._1_mb_q1_edu camp#i._1_mb_grade camp#i._1_mb_q4_edu ///
*camp#_1_child_fem camp#c.child_age ///
*camp#_1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
*camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
*|| mvid: ||clu2:
*
*testparm camp#c._1_m_age 
*testparm camp#i._1_mb_q1_edu 
*testparm camp#i._1_mb_grade 
*testparm camp#i._1_mb_q4_edu 
*testparm camp#_1_child_fem 
*testparm camp#c.child_age 
*testparm camp#_1_mb_q1_hunger 
*testparm camp#_1_mb_q2_hunger 
*testparm camp#_1_mb_q4_pregnant 
*testparm camp#c._1_mb_child_count 
*testparm camp#_1_mb_q2_fin 
*testparm camp#c._1_hh_res 
*testparm camp#c._1_hh_qua 
*}
*
* mixed me_PHQ _1_mb_PHQ i.tx##camp ///
*_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
*_1_child_fem child_age ///
*i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
*i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
*camp#c._1_m_age camp#i._1_mb_q1_edu camp#i._1_mb_grade camp#i._1_mb_q4_edu ///
*camp#_1_child_fem camp#c.child_age ///
*camp#_1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
*camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
*|| mvid: ||clu2:
*
*testparm camp#c._1_m_age 
*testparm camp#i._1_mb_q1_edu 
*testparm camp#i._1_mb_grade 
*testparm camp#i._1_mb_q4_edu 
*testparm camp#_1_child_fem 
*testparm camp#c.child_age 
*testparm camp#_1_mb_q1_hunger 
*testparm camp#_1_mb_q2_hunger 
*testparm camp#_1_mb_q4_pregnant 
*testparm camp#c._1_mb_child_count 
*testparm camp#_1_mb_q2_fin 
*testparm camp#c._1_hh_res 
*testparm camp#c._1_hh_qua 
*
*
*
*

**** All the variables created in the above code are already in the shared dataset (publication_data.dta)

*---------------------------------------------------------------------------------*
*			FATHER ENGAGEMENT OUTCOMES AS MEAN SCORES
*---------------------------------------------------------------------------------*
 ****************outcomes 1: FATHER MENTAL HEALTH

mixed fe_PHQ fb_PHQ tx camp ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua  ///
|| mvid: ||clu2: 

summ fe_PHQ
summ fe_PHQ if camp==0
summ fe_PHQ if camp==1


mixed fe_PHQ || mvid: ||clu2:
estat icc

*HOST
mixed fe_PHQ fb_PHQ i.tx##camp ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua  ///
|| mvid: ||clu2:

estat icc



*CAMP
mixed fe_PHQ fb_PHQ i.tx##host ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
host#c._1_f_age host#i.fb_q1_edu host#i.fb_grade host#i.fb_q4_edu ///
host#_1_child_fem host#c.child_age ///
host#i._1_mb_q1_hunger host#_1_mb_q2_hunger host#_1_mb_q4_pregnant host#c._1_mb_child_count ///
host#_1_mb_q2_fin host#c._1_hh_res host#c._1_hh_qua  ///
|| mvid: ||clu2:
 
estat icc


 *************************outcome 1.2 GAD father
 
*POOLED 
mixed fe_GAD tx camp ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua  ///
|| mvid: ||clu2:
estat icc
sum fe_GAD



*HOST
mixed fe_GAD i.tx##camp ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua  ///
|| mvid: ||clu2:

sum fe_GAD if camp==0

 *CAMP
mixed fe_GAD  tx##host ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
host#c._1_f_age host#i.fb_q1_edu host#i.fb_grade host#i.fb_q4_edu ///
host#_1_child_fem host#c.child_age ///
host#i._1_mb_q1_hunger host#_1_mb_q2_hunger host#_1_mb_q4_pregnant host#c._1_mb_child_count ///
host#_1_mb_q2_fin host#c._1_hh_res host#c._1_hh_qua  ///
|| mvid: ||clu2:

sum fe_GAD if camp==1


 ****************outcomes 2: ENGAGEMENT OUTCOMES FATHER REPORT & STIM ENVIRONMENT


 foreach x in ///
"en_p_f_sum" ///
"en_cb_f_sum" ///
"en_p_f_sum" ///
"en_cm_f_sum" ///
"en_d_f_sum" ///
"en_w_f_sum" ///
"sti_f_sum" ///
"fathering" ///
{ 
mixed e_`x' b_`x' tx camp ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua  ///
|| mvid: ||clu2:

mixed e_`x' b_`x' i.tx##camp ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_f_age camp#i.fb_q1_edu camp#i.fb_grade camp#i.fb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#_1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua  ///
|| mvid: ||clu2:


mixed e_`x' b_`x' i.tx##host ///
_1_f_age i.fb_q1_edu i.fb_grade i.fb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
host#c._1_f_age host#i.fb_q1_edu host#i.fb_grade host#i.fb_q4_edu ///
host#_1_child_fem host#c.child_age ///
host#i._1_mb_q1_hunger host#_1_mb_q2_hunger host#_1_mb_q4_pregnant host#c._1_mb_child_count ///
host#_1_mb_q2_fin host#c._1_hh_res host#c._1_hh_qua  ///
|| mvid: ||clu2:
} 


 foreach x in ///
"en_n_f_sum" ///
"en_cb_f_sum" ///
 "en_p_f_sum" ///
"en_cm_f_sum" ///
"en_d_f_sum" ///
"en_w_f_sum" ///
"sti_f_sum" ///
"fathering" ///
{ 
sum e_`x'
}

*sum alt_e_sti_f_sum

 foreach x in ///
 "en_n_f_sum" ///
"en_cb_f_sum" ///
 "en_p_f_sum" ///
"en_cm_f_sum" ///
 "en_d_f_sum" ///
 "en_w_f_sum" ///
  "sti_f_sum" ///
  "fathering" ///
{ 
sum e_`x' if camp==0
}

 foreach x in ///
 "en_n_f_sum" ///
"en_cb_f_sum" ///
 "en_p_f_sum" ///
"en_cm_f_sum" ///
 "en_d_f_sum" ///
 "en_w_f_sum" ///
  "sti_f_sum" ///
  "fathering" ///
{ 
sum e_`x' if camp==1
}

*---------------------------------------------------------------------------------*
*						MOTHER OUTCOMES -- MEAN SCORES
*---------------------------------------------------------------------------------*

 ***************** MENTAL HEALTH (PHQ) MOTHER REPORT

 mixed me_PHQ _1_mb_PHQ tx camp ///
_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_m_age  camp#i._1_mb_q1_edu camp#i._1_mb_grade camp#i._1_mb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#i._1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
|| mvid: || clu2:
estat icc
summ me_PHQ
 
 mixed me_PHQ _1_mb_PHQ i.tx##camp ///
_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_m_age  camp#i._1_mb_q1_edu camp#i._1_mb_grade camp#i._1_mb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#i._1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
|| mvid: || clu2:
estat icc

 mixed me_PHQ _1_mb_PHQ i.tx##host ///
_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
host#c._1_m_age  host#i._1_mb_q1_edu host#i._1_mb_grade host#i._1_mb_q4_edu ///
host#_1_child_fem host#c.child_age ///
host#i._1_mb_q1_hunger host#i._1_mb_q2_hunger host#_1_mb_q4_pregnant host#c._1_mb_child_count ///
host#_1_mb_q2_fin host#c._1_hh_res host#c._1_hh_qua ///
|| mvid: || clu2:
estat icc

sum me_PHQ
sum me_PHQ if camp==0
sum me_PHQ if camp==1
 ***************** ENGAGEMENT OUTCOMES MOTHER REPORT

 foreach x in ///
"en_n_m_sum" ///
"en_cb_m_sum" ///
"en_p_m_sum" ///
"en_cm_m_sum" ///
"en_d_m_sum" ///
"en_w_m_sum" ///
{ 
mixed e_`x' b_`x' tx camp ///
_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_m_age  camp#i._1_mb_q1_edu camp#i._1_mb_grade camp#i._1_mb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#i._1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
|| mvid: || clu2:
*estat icc

mixed e_`x' b_`x' i.tx##camp ///
_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
camp#c._1_m_age  camp#i._1_mb_q1_edu camp#i._1_mb_grade camp#i._1_mb_q4_edu ///
camp#_1_child_fem camp#c.child_age ///
camp#i._1_mb_q1_hunger camp#i._1_mb_q2_hunger camp#_1_mb_q4_pregnant camp#c._1_mb_child_count ///
camp#_1_mb_q2_fin camp#c._1_hh_res camp#c._1_hh_qua ///
|| mvid: || clu2:
*estat icc

mixed e_`x' b_`x' i.tx##host ///
_1_m_age i._1_mb_q1_edu i._1_mb_grade i._1_mb_q4_edu ///
_1_child_fem child_age ///
i._1_mb_q1_hunger i._1_mb_q2_hunger _1_mb_q4_pregnant _1_mb_child_count ///
i._1_mb_q2_fin _1_hh_res _1_hh_qua ///
host#c._1_m_age  host#i._1_mb_q1_edu host#i._1_mb_grade host#i._1_mb_q4_edu ///
host#_1_child_fem host#c.child_age ///
host#i._1_mb_q1_hunger host#i._1_mb_q2_hunger host#_1_mb_q4_pregnant host#c._1_mb_child_count ///
host#_1_mb_q2_fin host#c._1_hh_res host#c._1_hh_qua ///
|| mvid: || clu2:
*estat icc
} 


 foreach x in ///
 "en_n_m_sum" ///
"en_cb_m_sum" ///
 "en_p_m_sum" ///
"en_cm_m_sum" ///
 "en_d_m_sum" ///
 "en_w_m_sum" ///
{ 
sum e_`x'
}

 foreach x in ///
 "en_n_m_sum" ///
"en_cb_m_sum" ///
 "en_p_m_sum" ///
"en_cm_m_sum" ///
 "en_d_m_sum" ///
 "en_w_m_sum" ///
{ 
sum e_`x' if camp==0
}

 foreach x in ///
 "en_n_m_sum" ///
"en_cb_m_sum" ///
 "en_p_m_sum" ///
"en_cm_m_sum" ///
 "en_d_m_sum" ///
 "en_w_m_sum" ///
{ 
sum e_`x' if camp==1
}




